﻿
@{
    ViewBag.Title = "堆组件列表";
    Layout = "~/Views/Shared/_LayoutPage.cshtml";
}
@model List<IOA.MES.DataAccess.VModel.VSortRecord>

<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <table id="table" lay-filter="table"></table>
        </div>
    </div>
</div>

@section Scripts{
    <script>
        layui.use(['table', 'layer', 'form', 'laydate', 'element'], function () {
            var table = layui.table;

            var options = {
                elem: '#table'
                , limit: 100
                , height: 'full-50'
                , data:@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model))
                , cols: [[
                    { title: '序号', type: 'numbers', width: 80 }
                    , { field: 'BarCode', title: '条码', minWidth: 220 }
                    , { field: 'WorkshopName', title: '车间', minWidth: 100 }
                    , { field: 'LineName', title: '流水线', minWidth: 100 }
                    , { field: 'MachineName', title: '设备', minWidth: 150 }
                    , { field: 'StackNo', title: '堆号', minWidth: 100 }
                    , { field: 'FullCount', title: '满堆数量', minWidth: 100 }
                    , { field: 'SortNo', title: '当前块', minWidth: 100 }
                    , {
                        title: '包护角', minWidth: 80, templet: function (d) {
                            return d.FootProtect ? "包" : "不包";
                        }
                    }
                    , {
                        title: '翻转', minWidth: 80, templet: function (d) {
                            return d.OverTurn ? "翻转" : "不翻转";
                        }
                    }
                    , { field: 'CNStatus', title: '状态', minWidth: 100 }
                    , {
                        title: '分拣时间', minWidth: 150, templet: function (d) {
                            return d.CreateTime.replace("T", " ");
                        }
                    }
                    , { field: 'PowerLevel', title: '功率档', minWidth: 100 }
                    , { field: 'CurrentLevel', title: '电流档', minWidth: 100 }
                    , { field: 'QLevel', title: '等级', minWidth: 100 }
                    , { field: 'NameplateModel', title: '铭牌型号', minWidth: 150 }
                    , { field: 'OrderNo', title: '订单号', minWidth: 100 }
                    , { field: 'WorkOrderNo', title: '工单号', minWidth: 100 }
                ]]
            };
            table.render(options);
        });
    </script>
}
